<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib uri="/struts-tags" prefix="s"%>

<!DOCTYPE html>
<html>
   <head>
    	<title>学科管理系统</title>   
		<s:include value="../common/source.jsp"></s:include>	
		
  </head>
  <body onload="createCode()" style="background: #BAD4EA;">
  <div class="body">
  <div class="login-fr" id="login-fr">
  <div class=bo-login>
   <form action="admin/LoginAction.action" id="form-msg" class="sui-form form-horizontal" novalidate="novalidate" method="post" onsubmit="return validateCode()" >
   <div class="control-group">
    <label class="control-label"><img src="img/01.png"/>用&nbsp;&nbsp;户：</label>
    <div class="controls">
            <span class="sui-dropdown dropdown-bordered select">
              <span class="dropdown-inner">
                <a id="drop4" role="button" data-toggle="dropdown" href="#" class="dropdown-toggle">
                  <input value=2 name="power" type="hidden"><i class="caret"></i><span>教师</span>
                </a>
                <ul id="menu4" role="menu" aria-labelledby="drop4" class="sui-dropdown-menu">
                  <li role="presentation"><a role="menuitem" tabindex="-1" href="javascript:void(0);" value=2>教师</a></li>
                  <li role="presentation"><a role="menuitem" tabindex="-1" href="javascript:void(0);" value=1>方向管理员</a></li>
                  <li role="presentation" class="active"><a role="menuitem" tabindex="-1" href="javascript:void(0);" value=0>学科管理员</a></li>
                </ul>
              </span>
            </span>
          </div>
  </div>
    <div class="control-group">
    <label class="control-label"><img src="img/02.png"/>账&nbsp;&nbsp;户：</label>
    <div class="controls">
     <input type="text" class="input-large" id="username" name="user.user" data-rules="required">
    </div>
  </div>
  <div class="control-group">
    <label for="inputPassword" class="control-label"><img src="img/03.png"/>密&nbsp;&nbsp;码：</label>
    <div class="controls">
      <input type="text" class="input-large" id="userpass" name="user.password" data-rules="required" class="input-large">
    </div>
  </div>
  <div class="control-group">
    <label class="control-label"><img src="img/02.png"/>验证码：</label>
    <div class="controls">
     <input type="text" class="input-large" id="inputCode" data-rules="required" >
    </div>
   
  </div>
  <div class="control-group">
  <div class="code" id="checkCode" onclick="createCode()" ></div>
   <div class="code1" ></div>
  <a  href="#" onclick="createCode()">看不清换一张</a> 
 
     </div>
  <div class="control-group">
    <label for="sanwei" class="control-label"></label>
    <div class="controls">
      <button type="submit" class="sui-btn btn-primary">登录</button>&nbsp;&nbsp;
      <a href="templates/admin/seekCode.jsp" class="sui-btn btn-primary">忘记密码</a>
    </div>
  </div>
</form>
</div>
</div>
</div>
<script>
 function checknull()
	{
		var number0=document.getElementById("username").value;
		var number1=document.getElementById("userpass").value;
		if(number0==""||number1=="")
		{
			alert("用户名和密码不能为空！");
			return false;
		}
	}
	
</script>

	<!-- 前台错误提示 -->	
	<script>
	  $("#form-msg").validate({
	    
	  })
	</script>

<script> 

if (window != top) 
top.location.href = location.href; 

</script>
<script>
if("<s:property value="suc"/>"=="success"){
alert("密码错误！！！");}
</script>
<script>
if("<s:property value="suc"/>"=="error"){
alert("没有权限！！！");}
</script>

  </body>
</html>
